#include<stdio.h>

int narcissus(int n);
int main(void)
{
	int m;
	
	scanf("%d",&m);
	if(narcissus(m))
	{
		printf("yes");
	}
	else
	{
		printf("no");
	}
	
	return 0;
}
int narcissus(int n)
{
	int han,ten,one;
	han=n/100;
	ten=n%100/10;
	one=n%10;
	
	if(han*han*han+ten*ten*ten+one*one*one==n)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}
